package com.fht.service.food.impl;

import com.fht.entity.MerchantsInformation;
import com.fht.mapper.food.MerchantsInformationMapper;
import com.fht.service.food.MerchantsInformationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


@Slf4j
@Service
public class MerchantsInformationServiceImpl implements MerchantsInformationService {

    @Resource
    public MerchantsInformationMapper merchantsInformationMapper;

    @Override
    public List<MerchantsInformation> findAllIdAndName() {


        return merchantsInformationMapper.findAllIdAndName();
    }

    @Override
    public MerchantsInformation selectById(String merchantsId) {
        return merchantsInformationMapper.selectByPrimaryKey(merchantsId);
    }

    @Override
    @Transactional
    public void update(MerchantsInformation merchantsInformation) {

        merchantsInformationMapper.updateByPrimaryKeySelective(merchantsInformation);

    }
}
